﻿@{
    ViewBag.Title = "公司信息";
    Layout = "~/Views/Shared/_BackStageLayout.cshtml";
    CompanyModel company = new CompanyModel();
    if (ViewData["Data"] != null)
    {
        company = (CompanyModel)ViewData["Data"];
    }
}
    
<div id="content" class="content">
    <div class="panel panel-inverse" data-sortable-id="form-validation-1">
        <div class="panel-heading">
            <h4 class="panel-title">公司信息</h4>
        </div>
        <div class="panel-body panel-form">
            <form class="form-horizontal form-bordered" method="post" data-parsley-validate="true" name="demo-form" >
                <div class="form-group">
                    <label class="control-label col-md-4 col-sm-4" for="name">公司名称 * :</label>
                    <div class="col-md-2 col-sm-2">
                        <input class="form-control" type="text" id="name" name="name" value="@company.Name" placeholder="公司名称" data-parsley-required="true" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-4 col-sm-4" for="contactname">联系人 * :</label>
                    <div class="col-md-2 col-sm-2">
                        <input class="form-control" type="text" id="contactname" name="contactname" value="@company.ContactName" placeholder="联系人" data-parsley-required="true" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-4 col-sm-4" for="phone">联系电话 * :</label>
                    <div class="col-md-2 col-sm-2">
                        <input class="form-control" type="tel" id="phone" name="phone" value="@company.Phone"  placeholder="联系电话" data-parsley-required="true"  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-4 col-sm-4" for="address">联系地址  :</label>
                    <div class="col-md-2 col-sm-2">
                        <input class="form-control" type="text" id="address" name="address" value="@company.Address" placeholder="联系地址"  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-4 col-sm-4" for="email">联系邮箱  :</label>
                    <div class="col-md-2 col-sm-2">
                        <input class="form-control" type="text" id="email" name="email" value="@company.Email"  placeholder="联系邮箱" data-parsley-type="email"  />
                    </div>
                </div>
               
                <input class="form-control" type="hidden"  name="Id" value="@company.CompanyId"  />
                <div class="form-group">
                    <label class="control-label col-md-4 col-sm-4"></label>
                    <div class="col-md-6 col-sm-6">
                        <button type="submit" class="btn btn-primary">确定</button>
                        <button type="button" class="btn btn-warning" onclick="history.go(-1);">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- end row -->
</div>

@section footer {

<script src="/Content/assets/plugins/parsley/dist/parsley.js"></script>
    <script>
    $(document).ready(function () {
			App.init();
		});
    </script>
}
